package net.trustie.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface RecordDao {

	@Select("select last_record from records where site = #{site_name}")
	public Integer getLastRecord(@Param("site_name") String site);

	@Update("update records set last_record=#{lastRecord} where site=#{site_name}")
	public void updateRecord(@Param("site_name") String site,@Param("lastRecord")int lastRecord);
	
	@Insert("insert into records values(#{site_name},#{lastRecord})")
	public void insertRecord(@Param("site_name") String site,@Param("lastRecord")int lastRecord);
}
